const Base = require('./base.js');
module.exports = class extends Base {
	get relation() {
		return {
			category: {
				type: think.Model.BELONG_TO,
				model: 'store/category',
				key: 'category_id'

			},
			brand: {
				type: think.Model.BELONG_TO,
				model: 'store/brand',
				key: 'brand_id'

			},
			type: {
				type: think.Model.BELONG_TO,
				model: 'store/type',
				key: 'type_id'

			},
			attribute: {
				model: 'store/goods_attribute',
				type: think.Model.HAS_MANY
			},
			specification: {
				model: 'store/goods_specification',
				type: think.Model.HAS_MANY
			},
			product: {
				model: 'store/product',
				type: think.Model.HAS_MANY,
				order:{
					goods_sn: 'asc'
				}
			}
		}
	}
};